import 'package:flutter/services.dart';
import 'package:test2/util/sp.dart';

class HotKeyUtil {
  static PhysicalKeyboardKey getNewKey() {
    return PhysicalKeyboardKey(SpUtil.get().getInt("newkey") ?? 0x00070011);
  }

  static PhysicalKeyboardKey getScreenShotKey() {
    return PhysicalKeyboardKey(
      SpUtil.get().getInt("screenshotkey") ?? 0x00070014,
    );
  }

  static void setNewKey(int? code) {
    SpUtil.get().setInt("newkey", code ?? 0x00070011);
  }

  static void setScreenShotKey(int? code) {
    SpUtil.get().setInt("screenshotkey", code ?? 0x00070014);
  }
}
